<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: SRDO</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__CO__SRDO.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">SRDO<div class="ingroups"><a class="el" href="group__CO__CANopen__304.html">CANopen_304</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:CO__SRDO_8c"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__SRDO_8c.html">CO_SRDO.c</a></td></tr>
<tr class="memdesc:CO__SRDO_8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Safety Related Data Object protocol. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:CO__SRDO_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__SRDO_8h.html">CO_SRDO.h</a></td></tr>
<tr class="memdesc:CO__SRDO_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Safety Related Data Object protocol. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__SRDOCommPar__t.html">CO_SRDOCommPar_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">SRDO communication parameter.  <a href="structCO__SRDOCommPar__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__SRDOGuard__t.html">CO_SRDOGuard_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gurad Object for SRDO monitors:  <a href="structCO__SRDOGuard__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__SRDO__t.html">CO_SRDO_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">SRDO object.  <a href="structCO__SRDO__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gacd578e8a5a4af024f8e6f8aef87cbd14"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SRDO.html#gacd578e8a5a4af024f8e6f8aef87cbd14">CO_SRDOGuard_init</a> (<a class="el" href="structCO__SRDOGuard__t.html">CO_SRDOGuard_t</a> *SRDOGuard, CO_SDO_t *SDO, <a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> *operatingState, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *configurationValid, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> idx_SRDOvalid, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> idx_SRDOcrc)</td></tr>
<tr class="memdesc:gacd578e8a5a4af024f8e6f8aef87cbd14"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize SRDOGuard object.  <a href="group__CO__SRDO.html#gacd578e8a5a4af024f8e6f8aef87cbd14">More...</a><br /></td></tr>
<tr class="separator:gacd578e8a5a4af024f8e6f8aef87cbd14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0201fa4da8b37a18f864a9fd7c826a6c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SRDO.html#ga0201fa4da8b37a18f864a9fd7c826a6c">CO_SRDOGuard_process</a> (<a class="el" href="structCO__SRDOGuard__t.html">CO_SRDOGuard_t</a> *SRDOGuard)</td></tr>
<tr class="memdesc:ga0201fa4da8b37a18f864a9fd7c826a6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process operation and valid state changes.  <a href="group__CO__SRDO.html#ga0201fa4da8b37a18f864a9fd7c826a6c">More...</a><br /></td></tr>
<tr class="separator:ga0201fa4da8b37a18f864a9fd7c826a6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga608e6d48e97f1b4da316b36f10e389c6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SRDO.html#ga608e6d48e97f1b4da316b36f10e389c6">CO_SRDO_init</a> (<a class="el" href="structCO__SRDO__t.html">CO_SRDO_t</a> *SRDO, <a class="el" href="structCO__SRDOGuard__t.html">CO_SRDOGuard_t</a> *SRDOGuard, <a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, CO_SDO_t *SDO, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> defaultCOB_ID, const <a class="el" href="structCO__SRDOCommPar__t.html">CO_SRDOCommPar_t</a> *SRDOCommPar, const CO_SRDOMapPar_t *SRDOMapPar, const <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> *checksum, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> idx_SRDOCommPar, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> idx_SRDOMapPar, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANdevRx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANdevRxIdxNormal, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANdevRxIdxInverted, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANdevTx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANdevTxIdxNormal, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANdevTxIdxInverted)</td></tr>
<tr class="memdesc:ga608e6d48e97f1b4da316b36f10e389c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize SRDO object.  <a href="group__CO__SRDO.html#ga608e6d48e97f1b4da316b36f10e389c6">More...</a><br /></td></tr>
<tr class="separator:ga608e6d48e97f1b4da316b36f10e389c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac066166b35bcb3d0b01adfc0e2eb9bb1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SRDO.html#gac066166b35bcb3d0b01adfc0e2eb9bb1">CO_SRDO_initCallbackPre</a> (<a class="el" href="structCO__SRDO__t.html">CO_SRDO_t</a> *SRDO, void *object, void(*pFunctSignalPre)(void *object))</td></tr>
<tr class="memdesc:gac066166b35bcb3d0b01adfc0e2eb9bb1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize SRDO callback function.  <a href="group__CO__SRDO.html#gac066166b35bcb3d0b01adfc0e2eb9bb1">More...</a><br /></td></tr>
<tr class="separator:gac066166b35bcb3d0b01adfc0e2eb9bb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5303601f6f94c83530b5e165f54b54bb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SRDO.html#ga5303601f6f94c83530b5e165f54b54bb">CO_SRDO_initCallbackEnterSafeState</a> (<a class="el" href="structCO__SRDO__t.html">CO_SRDO_t</a> *SRDO, void *object, void(*pFunctSignalSafe)(void *object))</td></tr>
<tr class="memdesc:ga5303601f6f94c83530b5e165f54b54bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize SRDO callback function.  <a href="group__CO__SRDO.html#ga5303601f6f94c83530b5e165f54b54bb">More...</a><br /></td></tr>
<tr class="separator:ga5303601f6f94c83530b5e165f54b54bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac9a21725c4bb0373ea18a414019cf339"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SRDO.html#gac9a21725c4bb0373ea18a414019cf339">CO_SRDO_requestSend</a> (<a class="el" href="structCO__SRDO__t.html">CO_SRDO_t</a> *SRDO)</td></tr>
<tr class="memdesc:gac9a21725c4bb0373ea18a414019cf339"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send SRDO on event.  <a href="group__CO__SRDO.html#gac9a21725c4bb0373ea18a414019cf339">More...</a><br /></td></tr>
<tr class="separator:gac9a21725c4bb0373ea18a414019cf339"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacb94aa4f279a4476c193ee50c408dfbb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__SRDO.html#gacb94aa4f279a4476c193ee50c408dfbb">CO_SRDO_process</a> (<a class="el" href="structCO__SRDO__t.html">CO_SRDO_t</a> *SRDO, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> commands, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> timeDifference_us, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *timerNext_us)</td></tr>
<tr class="memdesc:gacb94aa4f279a4476c193ee50c408dfbb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process transmitting/receiving SRDO messages.  <a href="group__CO__SRDO.html#gacb94aa4f279a4476c193ee50c408dfbb">More...</a><br /></td></tr>
<tr class="separator:gacb94aa4f279a4476c193ee50c408dfbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>CANopen Safety Related Data Object protocol.</p>
<p>The functionality is very similar to that of the PDOs. The main differences is every message is send and received twice. The second message must be bitwise inverted. The delay between the two messages and between each message pair is monitored. The distinction between sending and receiving SRDO is made at runtime (for PDO it is compile time). If the security protocol is used, at least one SRDO is mandatory. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="gacd578e8a5a4af024f8e6f8aef87cbd14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacd578e8a5a4af024f8e6f8aef87cbd14">&#9670;&nbsp;</a></span>CO_SRDOGuard_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_SRDOGuard_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SRDOGuard__t.html">CO_SRDOGuard_t</a> *&#160;</td>
          <td class="paramname"><em>SRDOGuard</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">CO_SDO_t *&#160;</td>
          <td class="paramname"><em>SDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> *&#160;</td>
          <td class="paramname"><em>operatingState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>configurationValid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>idx_SRDOvalid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>idx_SRDOcrc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize SRDOGuard object. </p>
<p>Function must be called in the communication reset section.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SRDOGuard</td><td>This object will be initialized. </td></tr>
    <tr><td class="paramname">SDO</td><td>SDO object. </td></tr>
    <tr><td class="paramname">operatingState</td><td>Pointer to variable indicating CANopen device NMT internal state. </td></tr>
    <tr><td class="paramname">configurationValid</td><td>Pointer to variable with the SR valid flag </td></tr>
    <tr><td class="paramname">idx_SRDOvalid</td><td>Index in Object Dictionary </td></tr>
    <tr><td class="paramname">idx_SRDOcrc</td><td>Index in Object Dictionary</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions.">CO_ReturnError_t</a>: CO_ERROR_NO or CO_ERROR_ILLEGAL_ARGUMENT. </dd></dl>

</div>
</div>
<a id="ga0201fa4da8b37a18f864a9fd7c826a6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0201fa4da8b37a18f864a9fd7c826a6c">&#9670;&nbsp;</a></span>CO_SRDOGuard_process()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> CO_SRDOGuard_process </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SRDOGuard__t.html">CO_SRDOGuard_t</a> *&#160;</td>
          <td class="paramname"><em>SRDOGuard</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process operation and valid state changes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SRDOGuard</td><td>This object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>uint8_t command for <a class="el" href="group__CO__SRDO.html#gacb94aa4f279a4476c193ee50c408dfbb" title="Process transmitting/receiving SRDO messages.">CO_SRDO_process()</a>.<ul>
<li>bit 0 entered operational</li>
<li>bit 1 validate checksum </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga608e6d48e97f1b4da316b36f10e389c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga608e6d48e97f1b4da316b36f10e389c6">&#9670;&nbsp;</a></span>CO_SRDO_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_SRDO_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SRDO__t.html">CO_SRDO_t</a> *&#160;</td>
          <td class="paramname"><em>SRDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__SRDOGuard__t.html">CO_SRDOGuard_t</a> *&#160;</td>
          <td class="paramname"><em>SRDOGuard</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">CO_SDO_t *&#160;</td>
          <td class="paramname"><em>SDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nodeId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>defaultCOB_ID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structCO__SRDOCommPar__t.html">CO_SRDOCommPar_t</a> *&#160;</td>
          <td class="paramname"><em>SRDOCommPar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const CO_SRDOMapPar_t *&#160;</td>
          <td class="paramname"><em>SRDOMapPar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> *&#160;</td>
          <td class="paramname"><em>checksum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>idx_SRDOCommPar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>idx_SRDOMapPar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANdevRx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANdevRxIdxNormal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANdevRxIdxInverted</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANdevTx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANdevTxIdxNormal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANdevTxIdxInverted</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize SRDO object. </p>
<p>Function must be called in the communication reset section.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SRDO</td><td>This object will be initialized. </td></tr>
    <tr><td class="paramname">SRDOGuard</td><td>SRDOGuard object. </td></tr>
    <tr><td class="paramname">em</td><td>Emergency object. </td></tr>
    <tr><td class="paramname">SDO</td><td>SDO object. </td></tr>
    <tr><td class="paramname">nodeId</td><td>CANopen Node ID of this device. If default COB_ID is used, value will be added. </td></tr>
    <tr><td class="paramname">defaultCOB_ID</td><td>Default COB ID for this SRDO (without NodeId). </td></tr>
    <tr><td class="paramname">SRDOCommPar</td><td>Pointer to <em>SRDO communication parameter</em> record from Object dictionary (index 0x1301+). </td></tr>
    <tr><td class="paramname">SRDOMapPar</td><td>Pointer to <em>SRDO mapping parameter</em> record from Object dictionary (index 0x1381+). </td></tr>
    <tr><td class="paramname">checksum</td><td></td></tr>
    <tr><td class="paramname">idx_SRDOCommPar</td><td>Index in Object Dictionary </td></tr>
    <tr><td class="paramname">idx_SRDOMapPar</td><td>Index in Object Dictionary </td></tr>
    <tr><td class="paramname">CANdevRx</td><td>CAN device used for SRDO reception. </td></tr>
    <tr><td class="paramname">CANdevRxIdxNormal</td><td>Index of receive buffer in the above CAN device. </td></tr>
    <tr><td class="paramname">CANdevRxIdxInverted</td><td>Index of receive buffer in the above CAN device. </td></tr>
    <tr><td class="paramname">CANdevTx</td><td>CAN device used for SRDO transmission. </td></tr>
    <tr><td class="paramname">CANdevTxIdxNormal</td><td>Index of transmit buffer in the above CAN device. </td></tr>
    <tr><td class="paramname">CANdevTxIdxInverted</td><td>Index of transmit buffer in the above CAN device.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions.">CO_ReturnError_t</a>: CO_ERROR_NO or CO_ERROR_ILLEGAL_ARGUMENT. </dd></dl>

</div>
</div>
<a id="gac066166b35bcb3d0b01adfc0e2eb9bb1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac066166b35bcb3d0b01adfc0e2eb9bb1">&#9670;&nbsp;</a></span>CO_SRDO_initCallbackPre()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_SRDO_initCallbackPre </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SRDO__t.html">CO_SRDO_t</a> *&#160;</td>
          <td class="paramname"><em>SRDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(void *object)&#160;</td>
          <td class="paramname"><em>pFunctSignalPre</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize SRDO callback function. </p>
<p>Function initializes optional callback function, which should immediately start processing of <a class="el" href="group__CO__SRDO.html#gacb94aa4f279a4476c193ee50c408dfbb" title="Process transmitting/receiving SRDO messages.">CO_SRDO_process()</a> function. Callback is called after SRDO message is received from the CAN bus.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SRDO</td><td>This object. </td></tr>
    <tr><td class="paramname">object</td><td>Pointer to object, which will be passed to pFunctSignalPre(). Can be NULL </td></tr>
    <tr><td class="paramname">pFunctSignalPre</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga5303601f6f94c83530b5e165f54b54bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5303601f6f94c83530b5e165f54b54bb">&#9670;&nbsp;</a></span>CO_SRDO_initCallbackEnterSafeState()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_SRDO_initCallbackEnterSafeState </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SRDO__t.html">CO_SRDO_t</a> *&#160;</td>
          <td class="paramname"><em>SRDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(void *object)&#160;</td>
          <td class="paramname"><em>pFunctSignalSafe</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize SRDO callback function. </p>
<p>Function initializes optional callback function, that is called when SRDO enters a safe state. This happens when a timeout is reached or the data is inconsistent. The safe state itself is not further defined. One measure, for example, would be to go back to the pre-operational state Callback is called from <a class="el" href="group__CO__SRDO.html#gacb94aa4f279a4476c193ee50c408dfbb" title="Process transmitting/receiving SRDO messages.">CO_SRDO_process()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SRDO</td><td>This object. </td></tr>
    <tr><td class="paramname">object</td><td>Pointer to object, which will be passed to pFunctSignalSafe(). Can be NULL </td></tr>
    <tr><td class="paramname">pFunctSignalSafe</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gac9a21725c4bb0373ea18a414019cf339"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac9a21725c4bb0373ea18a414019cf339">&#9670;&nbsp;</a></span>CO_SRDO_requestSend()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_SRDO_requestSend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SRDO__t.html">CO_SRDO_t</a> *&#160;</td>
          <td class="paramname"><em>SRDO</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send SRDO on event. </p>
<p>Sends SRDO before the next refresh timer tiggers. The message itself is send in <a class="el" href="group__CO__SRDO.html#gacb94aa4f279a4476c193ee50c408dfbb" title="Process transmitting/receiving SRDO messages.">CO_SRDO_process()</a>. After the transmission the timer is reset to the full refresh time.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SRDO</td><td>This object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CO_ReturnError_t CO_ERROR_NO if request is granted </dd></dl>

</div>
</div>
<a id="gacb94aa4f279a4476c193ee50c408dfbb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacb94aa4f279a4476c193ee50c408dfbb">&#9670;&nbsp;</a></span>CO_SRDO_process()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_SRDO_process </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__SRDO__t.html">CO_SRDO_t</a> *&#160;</td>
          <td class="paramname"><em>SRDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>commands</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>timeDifference_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>timerNext_us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process transmitting/receiving SRDO messages. </p>
<p>This function verifies the checksum on demand. This function also configures the SRDO on operation state change to operational</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">SRDO</td><td>This object. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">commands</td><td>result from <a class="el" href="group__CO__SRDO.html#ga0201fa4da8b37a18f864a9fd7c826a6c" title="Process operation and valid state changes.">CO_SRDOGuard_process()</a>. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeDifference_us</td><td>Time difference from previous function call in [microseconds]. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">timerNext_us</td><td>info to OS. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Thu Dec 24 2020 14:30:50 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
